package com.weijian.dal.dataobject;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Generated;
import org.apache.ibatis.type.JdbcType;

import java.io.Serializable;
import java.time.LocalDateTime;

public abstract class BaseDO implements Serializable {
    @TableField(
        fill = FieldFill.INSERT
    )
    private LocalDateTime createTime;
    @TableField(
        fill = FieldFill.INSERT_UPDATE
    )
    private LocalDateTime updateTime;
    @TableField(
        fill = FieldFill.INSERT,
        jdbcType = JdbcType.VARCHAR
    )
    private String creator;
    @TableField(
        fill = FieldFill.INSERT_UPDATE,
        jdbcType = JdbcType.VARCHAR
    )
    private String updater;
    @TableLogic
    private Boolean deleted;

    @Generated
    public BaseDO() {
    }

    @Generated
    public LocalDateTime getCreateTime() {
        return this.createTime;
    }

    @Generated
    public LocalDateTime getUpdateTime() {
        return this.updateTime;
    }

    @Generated
    public String getCreator() {
        return this.creator;
    }

    @Generated
    public String getUpdater() {
        return this.updater;
    }

    @Generated
    public Boolean getDeleted() {
        return this.deleted;
    }

    @Generated
    public BaseDO setCreateTime(final LocalDateTime createTime) {
        this.createTime = createTime;
        return this;
    }

    @Generated
    public BaseDO setUpdateTime(final LocalDateTime updateTime) {
        this.updateTime = updateTime;
        return this;
    }

    @Generated
    public BaseDO setCreator(final String creator) {
        this.creator = creator;
        return this;
    }

    @Generated
    public BaseDO setUpdater(final String updater) {
        this.updater = updater;
        return this;
    }

    @Generated
    public BaseDO setDeleted(final Boolean deleted) {
        this.deleted = deleted;
        return this;
    }

    @Generated
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof BaseDO)) {
            return false;
        } else {
            BaseDO var2 = (BaseDO)o;
            if (!var2.canEqual(this)) {
                return false;
            } else {
                label71: {
                    Boolean var3 = this.getDeleted();
                    Boolean var4 = var2.getDeleted();
                    if (var3 == null) {
                        if (var4 == null) {
                            break label71;
                        }
                    } else if (var3.equals(var4)) {
                        break label71;
                    }

                    return false;
                }

                LocalDateTime var5 = this.getCreateTime();
                LocalDateTime var6 = var2.getCreateTime();
                if (var5 == null) {
                    if (var6 != null) {
                        return false;
                    }
                } else if (!var5.equals(var6)) {
                    return false;
                }

                label57: {
                    LocalDateTime var7 = this.getUpdateTime();
                    LocalDateTime var8 = var2.getUpdateTime();
                    if (var7 == null) {
                        if (var8 == null) {
                            break label57;
                        }
                    } else if (var7.equals(var8)) {
                        break label57;
                    }

                    return false;
                }

                String var9 = this.getCreator();
                String var10 = var2.getCreator();
                if (var9 == null) {
                    if (var10 != null) {
                        return false;
                    }
                } else if (!var9.equals(var10)) {
                    return false;
                }

                String var11 = this.getUpdater();
                String var12 = var2.getUpdater();
                if (var11 == null) {
                    if (var12 == null) {
                        return true;
                    }
                } else if (var11.equals(var12)) {
                    return true;
                }

                return false;
            }
        }
    }

    @Generated
    protected boolean canEqual(final Object other) {
        return other instanceof BaseDO;
    }

    @Generated
    public int hashCode() {
        int var1 = 1;
        Boolean var2 = this.getDeleted();
        var1 = var1 * 59 + (var2 == null ? 43 : var2.hashCode());
        LocalDateTime var3 = this.getCreateTime();
        var1 = var1 * 59 + (var3 == null ? 43 : var3.hashCode());
        LocalDateTime var4 = this.getUpdateTime();
        var1 = var1 * 59 + (var4 == null ? 43 : var4.hashCode());
        String var5 = this.getCreator();
        var1 = var1 * 59 + (var5 == null ? 43 : var5.hashCode());
        String var6 = this.getUpdater();
        var1 = var1 * 59 + (var6 == null ? 43 : var6.hashCode());
        return var1;
    }

    @Generated
    public String toString() {
        String var10000 = String.valueOf(this.getCreateTime());
        return "BaseDO(createTime=" + var10000 + ", updateTime=" + String.valueOf(this.getUpdateTime()) + ", creator=" + this.getCreator() + ", updater=" + this.getUpdater() + ", deleted=" + this.getDeleted() + ")";
    }
}